﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace _窗体委托传值
{
    public partial class Form2 : Form
    {
        public event HandleClick clickText;
        public Form2()
        {
            InitializeComponent();
            button1.Click += new EventHandler(SetText);
        }

        void SetText(object sender, EventArgs e)
        {
            if (clickText != null)
            {
                clickText(textBox1.Text);
            }
        }

    }
}
